<link href="__PUBLIC__/css/style.default.css" rel="stylesheet">

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="__PUBLIC__/js/html5shiv.js"></script>
<script src="__PUBLIC__/js/respond.min.js"></script>
<![endif]-->

<div class="mainpanel">
    <div class="pageheader">
        <div class="media">
            <div class="pageicon pull-left">
                <i class="fa fa-th-list"></i>
            </div>
            <div class="media-body">
                <ul class="breadcrumb">
                    <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
                    <li><a href="">首页</a></li>
                    <li>设备状态日志管理</li>
                </ul>
                <h4>设备状态日志管理</h4>
            </div>
        </div><!-- media -->
    </div>

    <div class="contentpanel">

        <div class="panel panel-primary-head">

            <table id="exRowTable" class="table table-striped table-bordered">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>创建时间</th>
                    <th>用户账号</th>
                    <th>pad唯一标识</th>
                    <th>设备编码</th>
                    <th>设备类型</th>
                    <th>设备状态</th>
                </tr>
                </thead>
            </table>
        </div><!-- panel -->

    </div>

</div>

<script>

    var exRowTable;
    $(function(){

        exRowTable = $('#exRowTable').DataTable({
            responsive: true,
            "fnDrawCallback": function(oSettings) {
                jQuery('#exRowTable_paginate ul').addClass('pagination-active-success');
            },
            "ajax": "{:url('admin/datacount/devicelogquery')}",
            "columns": [
                { "data": "id" },
                { "data": "create_time" },
                { "data": "pad_user_name" },
                { "data": "pad_dev_unique_id"},
                { "data": "dev_code"},
                { "data": "dev_type"},
                { "data": "dev_status","render": function ( data, type, full, meta ) {

                        switch (data){
                            case '1':
                                return '连线';
                                break;
                            case '2':
                                return '断线';
                                break;
                            default:
                                return '未知';
                                break;
                        }

                    }},


            ],
            "order": [[0, 'desc']]
        });

    })

</script>



